jBGallery.Interface = function(el, data, options) {

  if(options.randomize > 0)
    options.current = jBGallery.Randomizer(options.current, data.length());

  var _css = options.effect;
  if(!options.effect)
    _css = 'cnt';
  
  var _image = '<img style="visibility:hidden" class="' + _css + ' jbgallery-target " alt="' + data.get(options.current).title + '" src="' + data.get(options.current).href + '" />';
  //var _html = '<div class="jbg-wrap ' + options.style + '"><table cellpadding="0" cellspacing="0"><tr><td>' + _image + '</td></tr></table></div>';
  
  var _html = '<div class="jbg4-' + _css + '"><div class="jbg4-ptv"><div class="jbg4-img jbg4-prev" /><div class="jbg4-img jbg4-cur">'+_image+'</div><div class="jbg4-img jbg4-next" /></div></div>';

  var _caption = '<div class="jbg-caption" style="display:none"></div>';
  var _loading = '<div class="jbg-loading"><span class="jbg-loading"></span></div>';

  //hide
  $(el).hide().find("ul").hide();

  //$("#jbgallery-css").attr("media","screen");

  if (options.fullscreen) {
    $("html").addClass("jbg4-full");
    $(el).addClass("jbg4-zoom");
  } else {
    $(el).addClass("jbg4-box");
  }

  if(options.ie6)
    $("html").addClass("ie6");

  $(el)
  .prepend(_html)
  .prepend(_caption)
  .prepend(_loading);//jbox mod

  //first
  var _img = new Image();
  _img.onload = function() {
    $('.jbgallery-target',el).hide().css("visibility", "").fadeIn(options.timers.fade);
  };
  _img.src = data.get(options.current).href;

};